<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <ul id="parent"></ul>
    <script>
        // 优化页面渲染
    var parent=document.getElementById("parent");
    var fragment=document.createDocumentFragment();
    for(let i=0;i<10;i++){
        let li=document.createElement("li");
        li.innerHTML=i;
        fragment.appendChild(li);
        parent.appendChild(fragment);
    }
    </script>
</body>
</html>